package fictional.Common;

/**
 * Represents an Organization item. 
 */
public class OrganizationItem extends DBItem implements Comparable<OrganizationItem>{

	public static final int noFounder = -1;
	
	/**
	 * Returns a new Organization object. 
	 * @param id The organization's id
	 * @param mid The organization's mid
	 */
	public OrganizationItem(int id, String mid) {
		super(id, mid);
		this.founder_id = noFounder;
	}
	
	public OrganizationItem(int id, String mid, String name) {
		super(id, mid);
		this.founder_id = noFounder;
		this.name = name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	public String getName() {
		return name;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getType() {
		return type;
	}
	public void setFounder_id(int founder_id) {
		this.founder_id = founder_id;
	}
	public int getFounder_id() {
		return founder_id;
	}
	
	public int compareTo(OrganizationItem s) {
		if (s.name.equals(this.name))
			return 0;
		else
			return (s.name.compareTo(this.name));
	}
	private String name;
	private String type;
	private int founder_id;		
}
